//
//  ProblemController.m
//  AntsExpress
//
//  Created by slccper on 16/1/18.
//  Copyright © 2016年 slccper. All rights reserved.
//

#import "ProblemController.h"

@interface ProblemController ()
@property (weak, nonatomic) IBOutlet UITextView *Text;

@end

@implementation ProblemController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"常見問題";
    // Do any additional setup after loading the view from its nib.
}
-(void)getWebData
{
    if ([self.dic objectForKey:@"type"]) {
        self.Text.text = [self.dic objectForKey:@"txt"];
    }else{
        if ([clsOtherFun CheckNetworkStatus:YES]) {
            [clsOtherFun showLoadingView:@"正在獲取數據..."];
            if (ants) {
                ants.delegate=nil;
                ants=nil;
            }
            ants = [[clsAntsService alloc]init];
            ants.delegate=self;
            [ants GetQuestionListTxt:[self.dic objectForKey:@"pid"]];
        }else{
            [clsOtherFun ShowNoNetworkMsg];
        }
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)getAntsDataSuccess:(NSInteger)type :(NSMutableDictionary *)pDictionary
{
    [clsOtherFun hideLoadingView];
    NSDictionary *dic = [pDictionary objectForKey:@"data"];
    NSString *status = [dic objectForKey:@"status"];
    if ([status integerValue]==200) {
        NSDictionary *data = [dic objectForKey:@"data"];
        
        self.Text.text = [data objectForKey:@"Content"];
    }else{
        [clsOtherFun ShowMsgWithNoData];
    }
    
}
@end
